New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
46867 - add more helpful property path accessor exceptions #50128
46867 - add more helpful property path accessor exceptions #50128
Conversation
All tests seem to be passing, but there's some sort of infrastructure error when the pipeline runs:
Any ideas on what this means? It seems to be unrelated to the change in my PR. |
@nicolas-grekas @aurelijus @theinterned @alexislefebvre @OskarStark @xabbuh anybody have thoughts on what I should do next to try to get the pipeline running correctly again? As I mentioned, this broken pipeline doesn't seem to have anything to do with my (very small) changes, which I would really like to merge soon. |
try { | ||
$this->propertyAccessor->setValue($data, $propertyPath, $value); | ||
} catch (NoSuchPropertyException $e) { | ||
throw new NoSuchPropertyException($e->getMessage().' Make the property public, add a setter, or set the "mapped" field option in the form type to be false.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we set $e as the previous exception instead or concatenating the messages?
b63c15b
to
8d87a67
Compare
Thank you @patrickmaynard. |
Dear reviewers,
This small modification adds more helpful exceptions when properties cannot be accessed/set
using forms. Only one file was modified, so it should be relatively easy to review. Please feel free to leave a comment if you have any questions about what I'm doing here, and thanks for your work as a reviewer on an open-source project!
All the best,
Patrick